/* 定义全局变量 */
:root {
    --primary-color: #2d3e50;
    --secondary-color: #f9fafc;
    --accent-color: #2d8cf0;
    --hover-color: #1971c2;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.2);
}

/* 通用样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: auto;
}

/* 导航栏 */
.navbar {
    width: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    padding: 15px 0;
}

.navbar a {
    color: var(--white);
    padding: 10px 20px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.navbar a:hover {
    background-color: #1a2a3b;
    border-radius: 5px;
}

.last_li {
    margin-left: auto;
}

.toRight {
    margin-left: 20px;
}

/* 主标题 */
.header {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
}

.header h1 {
    font-size: 2.5em;
    color: var(--primary-color);
}

.header p {
    font-size: 1.2em;
    color: var(--text-light);
}

/* 竞赛卡片样式 */
.competitions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    width: 100%;
}

.competition-item {
    background-color: var(--white);
    width: 220px;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.competition-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px var(--shadow);
    background-color: var(--accent-color);
    color: var(--white);
}

.competition-item h2 {
    font-size: 1.4em;
    color: var(--primary-color);
}

.competition-item p {
    font-size: 1em;
    color: var(--text-light);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .competitions {
        flex-direction: column;
        align-items: center;
    }

    .competition-item {
        width: 100%;
        max-width: 300px;
    }
}
